<?php

namespace App\Http\Logic;

use App\Components\HttpError;
use Illuminate\Support\Facades\DB;

class Logic
{
    private static $_instances = [];

    protected function __construct()
    {
    }

    /**
     * 单例模式
     * @return static
     */
    public static function getInstance()
    {
        $class = get_called_class();
        if (!isset(self::$_instances[$class])) {
            self::$_instances[$class] = new static();
        }
        return self::$_instances[$class];
    }
}
